package com.hualude.roadsign.service;

import com.hualude.roadsign.dto.*;

import java.util.List;

/**
 * Created by xu_jiaHui on 2017/10/13.
 */
public interface AlarmService {

    /**
     * @Description: 获取报警器用于DT展示
     * @author xu_jiaHui
     * @date 2017/10/13 21:25
     */
    DTResponseDto getAlarm4DT(DTRequestDto dtRequestDto, Integer orgId, Integer actorId, Integer deviceType) throws Exception;

    /**
     * @Description: 根据搜索获取报警器信息
     * @uthor xu_jiaHui
     * @date 2018/4/22
     */
    DTResponseDto getAlarmBySearch4DT(DTRequestDto dtRequestDto, String orgId, String deviceId, String createTime, Integer deviceType) throws Exception;

    /**
     * @Description: 通过设备Id获取端口列表
     * @author xu_jiaHui
     * @date 2017/10/13 21:25
     */
    List<PortDto> getPortById(String deviceId) throws Exception;

    /**
     * @Description: 根据端口号设备号删除端口
     * @author xu_jiaHui
     * @date 2017/10/13 22:06
     */
    Integer deletePortById(Integer portId) throws Exception;

    /**
     * @Description: 给报警器添加端口
     * @author xu_jiaHui
     * @date 2017/10/13 22:26
     */
    Integer addPort4Alarm(PortDto portDto) throws Exception;

    /**
     * @Description: 添加报警器
     * @author xu_jiaHui
     * @date 2017/10/14 14:06
     */
    Integer addAlarm(AlarmDto alarmDto) throws Exception;

    /**
     * @Description: 更新报警器信息
     * @author xu_jiaHui
     * @date 2017/10/14 14:12
     */
    Integer updateAlarm(AlarmDto alarmDto) throws Exception;

    /**
     * @Description: 通过id删除报警器
     * @author xu_jiaHui
     * @date 2017/10/14 14:52
     */
    Integer deleteAlarmById(String alarmIds) throws Exception;

    /**
     * @Description: 更新端口信息
     * @author xu_jiaHui
     * @date 2017/10/14 14:55
     */
    Integer updatePort(PortDto portDto) throws Exception;

    /**
     * @Description: 发送IOcmd指令
     * @author xu_jiaHui
     * @date 2017/10/17 10:44
     */
    Integer sendIoCmd(String deviceId, String cmd, Integer cycleTime) throws Exception;

    /**
     * @Description: 通过deviceId获取日志
     * @author xu_jiaHui
     * @date 2017/10/30 18:53
     */
    DTResponseDto getDeviceRecord4DT(DTRequestDto dtRequestDto, String deviceId, String infoType) throws Exception;

    List<AlarmDto> getAlarmPath(String deviceId) throws Exception;

    List<AlarmDto> getAlarmList(Integer orgId) throws Exception;


    /**
     * @Description: 通过deviceId获取最小的报警信息
     * @uthor xu_jiaHui
     * @date 2018/5/25
     */
    AlarmPushDto getLastAlarmPushByDeviceId(String deviceId) throws Exception;


}
